<?php

class EmployeesTable extends CF_TableAjUpdate {


}

function show_listview($ar_data,$fieldspec,$ar_lookups = '',$filters = ''){

	$tbl_fs = new EmployeesTable($fieldspec,$ar_data,'employeestbl');
	$tbl_fs->set_actionpage("employees_ctl.php");
	$tbl_fs->setLookups($ar_lookups);
	$html_fs = $tbl_fs->maketable();
	
	$header_fs = new CF_Header($fieldspec, "employees_ctl.php",'');
	
	print '<pre>';
	echo "FILTERS \n";
	print_r($filters);
	echo "lookuplists \n";
	print_r($ar_lookups);
	print '</pre>';
	
	$fltf_fs = new CF_FilterForm($fieldspec,$filters,"employees_ctl.php");
	$fltf_fs->set_lookup_lists($ar_lookups);
	//$fltf_fs->set_actionpage("employees_ctl.php");
	
	
	?>
		<link type="text/css" href="../css/humanity/jquery-ui-1.8.9.custom.css" rel="stylesheet" />	
		<script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="../js/jquery-ui-1.8.9.custom.min.js"></script>
		<script type="text/javascript" src="../../CF_JS/CF_SyncVal.js"></script>
		
		<table>
		<? echo $fltf_fs->make_filters_box() ?>
		
		</table>
		
		
	<table>
	<?php
	echo $header_fs->make_sort_heading();
	echo $html_fs;
?>

</table>
<script type="text/javascript">
<?php print $tbl_fs->make_supportJS() ?>
</script>

<?php
$ab = new CF_AddBox($fieldspec, 'fieldspecs', $filters, 'employees_ctl.php');
//$ab_form = $ab->make_add_box();
//print $ab_form;
$ab->set_lookup_lists($ar_lookups);
$filter_set = CF_FilterReciever::filters_to_set($filters);

?>

<form name='employees_add' action='employees_ctl.php' method='post'>
<input type='hidden' name='mode' value='add' />
<table>
<?php print $ab->add_form($fieldset,$filters,$filter_set); ?>
</table>
<input type='submit' value='Add' />
</form>


<?php
}

?>